package com.compass.framework.model

import android.os.Parcelable
import kotlinx.parcelize.Parcelize

/**
 * Description： 知识中心首页
 * Date:2023/12/26 9:39
 */
data class KnowledgeCenter(
    val specialColumnJournalismCountPrice: Long ,
    val videoCount: Int?,//视频数量
    val specialColumnCount: Int?,////订阅人数
    val articleCount: Int ,//文章数量
    val commentList: MutableList<Comment> = mutableListOf(),
    val orderSpecialColumnList: MutableList<OrderSpecial> = mutableListOf(),
    val articleList: MutableList<ArticleOrVideo> = mutableListOf(),
    val videoList: MutableList<ArticleOrVideo> = mutableListOf(),

)

@Parcelize
data class Comment(
    val specialColumnJournalismId: String,
    val patientId: String,
    val status: Int,
    val id: String,
    val readNum: Int,
    val likeNum: Int,
    val createTime: Long,
    val journalismTitle: String?,
    val journalismImg: String?,
    val patientAvatar: String?,
    val patientName: String?,
    val content: String?,
    val title: String?
) : Parcelable

@Parcelize
data class OrderSpecial(
    val doctorId: String,
    val patientId: String,
    val transactionId: String,
    val price: Long,
    val status: Int,
    val type: Int,//1、时订阅 2、是购买
    val id: String,
    val readNum: Int,
    val likeNum: Int,
    val payTime: Long,
    val createTime: Long,
    val doctorName: String?,
    val patientAvatar: String?,
    val patientName: String?,
    val journalismTitle: String?,//最新购买的时候取值
    val journalismImg: String?, //最新购买的时候取值
    val title: String?, //订单的时候取值
    val coverImg: String?////订单的时候取值
) : Parcelable {
    fun getUserNam(): String {
        return if (patientName.isNullOrEmpty()) "未知姓名" else patientName
    }
}


@Parcelize
data class ArticleOrVideo(
    val videoUrl: String?,
    val videoSize: String?,
    val content: String?,
    val readNum: Int,
    val sort: Int,
    val specialColumnId: String,
    val title: String,
    val coverImg: String?,
    val type: Int,
    val status: Int,
    val likeNum: Int,
    val price: Double,
    val id: String,
    val createTime: Long,
    val doctorName: String?,
    val tag: Int //1 健康科普  2，诊疗案例
) : Parcelable